package com.zyf.project.kvdb.protocol.proto.wal;

import com.zyf.project.binaryproto.annotation.DataContract;
import com.zyf.project.binaryproto.annotation.DataField;
import com.zyf.project.kvdb.protocol.constants.Constants;

import java.io.Serializable;

/**
 * <h1>键值对实体</h1>
 *
 * @author Zhou Yifan
 */
@DataContract(code = Constants.WAL_ENTITY)
public interface Entity extends Serializable {

    /**
     * 获取键值对
     *
     * @return {@link KV} 数组
     */
    @DataField(order = 1, list = true, refContract = true)
    KV[] getKVs();

}
